package BC113_小乐乐定闹钟;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();

        String[] str = input.split(" ");
        String[] time = str[0].split(":");

        int duration = Integer.parseInt(str[1]);
        int hour = Integer.parseInt(time[0]);
        int minute = Integer.parseInt(time[1]);

        int addHour = duration /  60;
        int addMinute = duration % 60;

        int newMinute = minute + addMinute;
        if (newMinute >= 60){
            addHour += 1;
        }
        System.out.printf("%02d:%02d", (hour + addHour) % 24, (minute + addMinute) % 60);
    }
}
